package com.epfuse.cloud.common.redis.serializer.annotation;

import com.epfuse.cloud.common.redis.serializer.RedisSerializerProperties;
import com.epfuse.cloud.common.redis.serializer.enums.SerializerType;
import org.springframework.core.annotation.AliasFor;
import org.springframework.stereotype.Component;

import java.lang.annotation.*;


/**
 * 序列化方式注解 使用在完成序列换和反序列化的类上
 *
 * @Author 孙峰
 */
@Component
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface EpfuseRedisSerializer {

    @AliasFor(annotation = Component.class)
    String value() default "";

    /**
     * 序列化方式
     *
     * @return
     */
    SerializerType serializer() default SerializerType.JDK;
}
